import request from '@/utils/request'

export function getCode(params) {

    return request({
        method: "post",
        url: "/api/common/sendCode",
        params
    })
}
export function getUsercode(params) {
    return request({
        methods: 'get',
        url: '/api/customer/user/getUserByInvitationCode',
        params
    })
}
export function register(params) {
    return request({
        method: "post",
        url: "/api/oauth/register",
        data: params
    })
}
export function loginByPassword(params) {
    return request({
        method: "post",
        url: "/api/oauth/loginByPassWord",
        data: params
    })
}

export function loginByPhone(params) {
    return request({
        method: "post",
        url: "/api/oauth/loginByPhone",
        data: params
    })
}

export function cancellation(params) {
    return request({
        method: "post",
        url: '/api/customer/user/cancellation',
        data: params
    })
}
export function resetPassword(params) {
    return request({
        method: "post",
        url: '/api/customer/user/resetPassword',
        data: params
    })
}
export function getUserAll() {
    return request({
        method: "get",
        url: '/api/customer/user/getUserAll',
    })
}

export function editIdCard(params) {
    return request({
        method: "post",
        url: "/api/customer/user/editIdCard",
        data: params
    })
}

export function ipageInvitation(params) {
    return request({
        method: "post",
        url: "/api/customerUserInvitation/ipageInvitation",
        data: params
    })
}

export function editNickName(params) {
    return request({
        method: "post",
        url: "/api/customer/user/editNickName",
        params
    })
}

export function editPayPassword(params) {//修改操作密码
    return request({
        method: "post",
        url: "/api/customer/user/editPayPassword",
        data: params
    })
}
export function upload(params) {//上传图片
    return request({
        method: "post",
        url: "/api/common/upload",
        params
    })
}
export function editHeadImage(params) {//修改头像
    return request({
        method: "post",
        url: "/api/customer/user/editHeadImage",
        params
    })
}
export function bannerList() {
    return request({
        method: "get",
        url: "/api/banner/bannerList"

    })
}
//
export function imgcode() {
    return request({
        method: "get",
        url: "/api/oauth/code"

    })
}
export function editPay(params) {
    return request({
        method: "post",
        url: "/api/customer/user/editPay",
        data: params

    })
}
export function registerLogin(params) {
    return request({
        method: "post",
        url: '/api/oauth/registerLogin',
        data: params
    })
}
